<?php

// PHP严格模式，strict_type
declare(strict_types=1);
function sum(int ...$args): int
{
    return array_sum($args);
}

try {
    echo sum(1, 2, 3, '1');
} catch (\Throwable $th) {
    echo $th->getMessage();
}